import request from '@/utils/request'

// 添加分类
export function add(name) {
    return request({
        url: 'api/category/add',
        method: 'post',
        data: {
            name,
        }
    }) 
}
// 获取所有分类(分页)
export function getInfo(current, size) {
    return request({
        url: 'api/category/info',
        method: 'post',
        data: {
            current,
            size
        }
    })
}
// 获取所有分类
export function listCategory() {
    return request({
        url: '/api/category/list',
        method: 'get',
    })
}
export function del(data) {
    return request({
        url: 'api/category/del',
        method: 'post',
        data
    })
}